package com.loren.demo08.example02;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class DeviceFactory {

    private static final Map<String, PlayGame> deviceMap = new ConcurrentHashMap<>();

    public static PlayGame getGameDevice(String device) {
        return deviceMap.get(device);
    }

    public static void addDevice(String device, PlayGame playGame) {
        deviceMap.put(device, playGame);
    }
}
